package com.yami.shop.mystery.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.mystery.common.model.MysteryBoxExtension;

import java.util.List;

/**
 * @author wxf
 * @date 2023/4/10 10:31
 */
public interface MysteryBoxExtensionService extends IService<MysteryBoxExtension> {

    /**
     *  通过盲盒
     *
     * @param boxId
     * @return
     */
    List<MysteryBoxExtension> findExtensionByBoxId(Long boxId);

    /**
     * 回退盲盒商品库存
     *
     * @param extension
     * @return
     */
    int rollbackStocks(MysteryBoxExtension extension);
}
